<%@ page language="java"
	import="java.util.*,java.text.*,java.sql.*,yy.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<%
		request.setCharacterEncoding("UTF-8");
		String s1 = request.getParameter("xuehao");
		String s2 = request.getParameter("xingming");
		String s3 = request.getParameter("xingbie");
		String s4 = request.getParameter("dianhua");
		String s5 = request.getParameter("qq");
		String s6 = request.getParameter("weixin");
		String s7 = request.getParameter("nianji");
		String s8 = request.getParameter("ruxueriqi");
		String s9 = request.getParameter("chengshi");
		String s10 = request.getParameter("shengri");
		String s11 = request.getParameter("zhuzhi");
		String s12 = request.getParameter("mima");
		String s13 = request.getParameter("last");
		MySqlStudentDao my = new MySqlStudentDao();
		yy.Student s = new yy.Student();
		s.setStuno(s1);
		s.setSname(s2);
		s.setSex(s3);
		s.setGradeid(s7);
		s.setEnterdate(s8);
		s.setFromcity(s9);
		if(my.add(s)==1){
		out.print("保存成功！");
		response.sendRedirect("5.31zuoye2.2.jsp"); 
		}
		else
		out.print("增加失败！");
	%>
</body>
</html>